home *** CD-ROM | disk | FTP | other *** search
- Path: grimsel.zurich.ibm.com!usenet
- From: wgk@zurich.ibm.com (Keith Whittingham)
- Newsgroups: comp.lang.c++
- Subject: Re: Zeroing out a css
- Date: 2 Apr 1996 07:31:36 GMT
- Organization: IBM Research, ZRH
- Message-ID: <4jql4o$11p1@grimsel.zurich.ibm.com>
- References: <4jovdj$3mb@istwok.ods.com>
- Reply-To: wgk@zurich.ibm.com
- NNTP-Posting-Host: pine.zurich.ibm.com
- X-Newsreader: IBM NewsReader/2 v1.00
-
- >I am curious what the implications of the following code snipet would be...?
- >x::x()
- >{
- > memset(this, 0x0, sizeof(x));
- >}
- >
-
- Implementation dependant as it depends how the compiler implements a class.
- It also, of course depends on what your class contains. It's a shame that
- this isn't valid code or that the C++ spec defined that all class members
- were init'd to 0 - (i.e. calloc was called by new instead of malloc)
- it would probably have saved millions of lines of code and lord knows how
- many clock cycles...
-
- Keith
-
-
-